﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="profile.aspx.cs" Inherits="user_profile" %>

<%@ Register Src="~/controls/usrDate.ascx" TagName="usrDate" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<link rel="stylesheet" type="text/css" href="/css/fancybox.css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
<script type="text/javascript" src="/scripts/jquery.js"></script>
<script type="text/javascript" src="http://www.josiah.com.sg/scripts/jquery.js"></script>
<script type="text/javascript" src="/scripts/jquery.fancybox.js"></script>
    <!-- Scripts  |  Start  -->

    <script type="text/javascript">
        $(document).ready(function() {
            $().UItoTop({ easingType: 'easeOutQuart' });
        });

        $("#op").css({ opacity: 0.5 });
    </script>

    <!-- Scripts  |  End    -->
    <script type="text/javascript">
        $(document).ready(function() {

            $(".opt1").fancybox({
                'width': '75%',
                'height': '45%',
                'autoScale': false,
                'transitionIn': 'none',
                'transitionOut': 'none',
                'type': 'iframe'
            });

            $(".opt2").fancybox({
                'width': '75%',
                'height': '80%',
                'autoScale': false,
                'transitionIn': 'none',
                'transitionOut': 'none',
                'type': 'iframe'
            });

            $(".opt3").fancybox({
                'width': '75%',
                'height': '55%',
                'autoScale': false,
                'transitionIn': 'none',
                'transitionOut': 'none',
                'type': 'iframe'
            });

            $(".opt4").fancybox({
                'width': '75%',
                'height': '90%',
                'autoScale': false,
                'transitionIn': 'none',
                'transitionOut': 'none',
                'type': 'iframe'
            });

        });
</script>
    <link rel="stylesheet" href="../hr/css/content.css" />
    <script src="../controls/Date.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageBody" runat="Server">
    <!-- Showcase Banner  |  Start -->
    <div id="showcase">
        <div id="canvas" class="career">
            
            <div class="grid z30">
            </div>
            <div class="manlady z25">
            </div>
            <div class="bg z20">
            </div>
            <div id="cloud_big" class="career z15">
            </div>
            <div class="sun z10">
            </div>
        </div>
    </div>
    <!-- Showcase Banner  |  End   -->
    <div class="seperator">
    </div>
    <div id="body">
        <!-- Right Column | Start -->
        <div class="col_left">
            <div class="menu">
                <ul>
                    <li><a href="../careers/job-list.aspx">Careers</a></li>
                    <li><a href="profile.aspx" class="select">Profile</a></li>
                    <li><a href="application.aspx">Application Applied</a></li>
                    <li><a href="change-password.aspx">Change Password</a></li>
                    <li><a href="logout.aspx">Logout</a></li>
                </ul>
            </div>
        </div>
        <!-- Right Column | End   -->
        <!-- Content Column | Start -->
        <div class="col_mid">
            <!-- Quick Nav [Prev / Next]  |  Start  -->
            <div class="quick_nav_container">
                <div class="quick_nav right">
                    <div class="quick_nav_button">
                        <a href="../careers/" class="prev">
                            <img src="../images/other/spacer.png" alt="Previous Page" width="10" height="15" /></a></div>
                    <div class="quick_nav_button">
                        <a href="#" class="empty">
                            <img src="../images/other/spacer.png" alt="Next Page" width="10" height="15" /></a></div>
                </div>
            </div>
            <!-- Quick Nav [Prev / Next]  |  End    -->
            <h1 class="heading">
                <asp:Label runat="server" ID="lblFormTitle" Text="Profile" /></h1>
            <div class="seperator">
            </div>
            <div class="content">
                <div id="divAppForm" runat="server">
                    <table width="100%" cellpadding="3" cellspacing="3">
                        <tr>
                            <td colspan="3">
                                <h2>
                                    <asp:Label runat="server" ID="lblFormSubTitle" Text="Profile information update" /> </h2>
                                <br />
                                <span style="display: none; color: Red; font-weight: bold; font-size: small">All fields
                                    are required.</span>
                                <asp:ValidationSummary runat="server" ID="vsApplyNow" ValidationGroup="applynow"
                                    ShowSummary="false" ShowMessageBox="true" HeaderText="Opps.., please complete all (*) field(s)." />
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                Name
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlTitle" runat="server">
                                    <asp:ListItem Text="Select ..." Value="-1"></asp:ListItem>
                                    <asp:ListItem Text="Mr." Value="Mr."></asp:ListItem>
                                    <asp:ListItem Text="Mrs." Value="Mrs."></asp:ListItem>
                                    <asp:ListItem Text="Ms." Value="Ms."></asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator runat="server" ID="rfvTitle" ControlToValidate="ddlTitle"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please select title."
                                    Text="*" InitialValue="-1" />
                                <asp:TextBox runat="server" ID="txtFullName" MaxLength="120" Width="169px" />
                                <asp:RequiredFieldValidator runat="server" ID="rfvFullName" ControlToValidate="txtFullName"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please enter your name."
                                    Text="*" />
                                <asp:RegularExpressionValidator ID="revFullName" runat="server" ValidationGroup="applynow"
                                    ValidationExpression="^[a-zA-Z''-'\s]{2,120}$" ControlToValidate="txtFullName"
                                    Text="**" ErrorMessage="Invalid character(s) in full name." Display="Dynamic"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                Contact Number
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txtContactNumber" MaxLength="50" Width="250px" />
                                <asp:RequiredFieldValidator runat="server" ID="rfvContactNumber" ControlToValidate="txtContactNumber"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please enter contact (mobile, office, home) number."
                                    Text="*" />
                                <asp:RegularExpressionValidator ID="revContactNumber" runat="server" ValidationGroup="applynow"
                                    ValidationExpression="^[0-9-+' ']{5,20}$" ControlToValidate="txtContactNumber"
                                    Text="**" ErrorMessage="Invalid character(s) in contact number." Display="Dynamic"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                DOB
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <uc1:usrDate ID="usrDOB" runat="server" ValidationGroup="applynow" IsAllowGreaterThanToday="false" />
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                Qualification
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txtQualification" MaxLength="120" Width="250" />
                                <asp:RequiredFieldValidator runat="server" ID="rfvQualification" ControlToValidate="txtQualification"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please enter qualification."
                                    Text="*" />
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                No of Years of Experience
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlExpYear" runat="server">
                                    <asp:ListItem Text="Select ..." Value="-1"></asp:ListItem>
                                    <asp:ListItem Text="Fresh Graduate" Value="Fresh Graduate"></asp:ListItem>
                                    <asp:ListItem Text="Less than or equal 1 year" Value="Less than or equal 1 year"></asp:ListItem>
                                    <asp:ListItem Text="Less than or equal 2 years" Value="Less than or equal 2 years"></asp:ListItem>
                                    <asp:ListItem Text="Less than or equal 3 years" Value="Less than or equal 3 years"></asp:ListItem>
                                    <asp:ListItem Text="Less than or equal 4 years" Value="Less than or equal 4 years"></asp:ListItem>
                                    <asp:ListItem Text="Less than or equal 5 years" Value="Less than or equal 5 years"></asp:ListItem>
                                    <asp:ListItem Text="Less than or equal 6 years" Value="Less than or equal 6 years"></asp:ListItem>
                                    <asp:ListItem Text="Less than or equal 7 years" Value="Less than or equal 7 years"></asp:ListItem>
                                    <asp:ListItem Text="Less than or equal 8 years" Value="Less than or equal 8 years"></asp:ListItem>
                                    <asp:ListItem Text="Less than or equal 9 years" Value="Less than or equal 9 years"></asp:ListItem>
                                    <asp:ListItem Text="More than 9 years" Value="More than 9 years"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator runat="server" ID="rfvExpYear" ControlToValidate="ddlExpYear"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please select years of experience."
                                    Text="*" InitialValue="-1" />
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                Sales Experience
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlSaleExp" runat="server">
                                    <asp:ListItem Text="Select ..." Value="-1"></asp:ListItem>
                                    <asp:ListItem Text="Yes" Value="Yes"></asp:ListItem>
                                    <asp:ListItem Text="No" Value="No"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator runat="server" ID="rfvSaleExp" ControlToValidate="ddlSaleExp"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please select sales experience (Yes or No)."
                                    Text="*" InitialValue="-1" />
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                 Employment Status
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlEmpStatus" runat="server">
                                    <asp:ListItem Text="Select ..." Value="-1"></asp:ListItem>
                                    <asp:ListItem Text="Employed" Value="Employed"></asp:ListItem>
                                    <asp:ListItem Text="Unemployed" Value="Unemployed"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator runat="server" ID="rfvEmpStatus" ControlToValidate="ddlEmpStatus"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please select employment status."
                                    Text="*" InitialValue="-1" />
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                 Occupation / Job Title
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txtOccupation" MaxLength="120" Width="250" />
                                <asp:RequiredFieldValidator runat="server" ID="rfvOccupation" ControlToValidate="txtOccupation"
                                    ValidationGroup="applynow" Display="Dynamic" ErrorMessage="Please enter occupation/job title."
                                    Text="*" />
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                                Preferred Country
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlCountry" runat="server">
                                    <asp:ListItem Text="Select ..." Value="-1" />
                                    <asp:ListItem Text="Singapore" Value="SG" />
                                    <asp:ListItem Text="Thailand" Value="TH" />
                                    <asp:ListItem Text="Malaysia" Value="MY" />
                                    <asp:ListItem Text="Hong Kong" Value="HK" />
                                    <asp:ListItem Text="Indonesia" Value="ID" />
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator runat="server" InitialValue="-1" ID="rfvCountry" ControlToValidate="ddlCountry"
                                    ValidationGroup="applynow" ErrorMessage="Please select prefered country name."
                                    Text="*" />
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" width="170px">
                                <span id="spanCV" runat="server">Attach CV </span>
                            </td>
                            <td valign="top">
                                :
                            </td>
                            <td valign="top">
                                <span id="spanFCV" runat="server">
                                    <asp:Button ID="btnDownloadCV" runat="server" Text="Download CV" 
                                    onclick="btnDownloadCV_Click" Width="100px" Height="30px" />
                                <asp:HiddenField ID="hidCV" runat="server" />  
                                <br />
                                    <asp:Label ID="lblUploadNew" runat="server" Visible="false" Text="(or upload your latest CV)<br>" Font-Italic="true" Font-Size="70%"></asp:Label>
                                    <asp:FileUpload runat="server" ID="fupCV" />
                                    <asp:RegularExpressionValidator ID="revCV" runat="server" ValidationGroup="applynow"
                                        ValidationExpression="^.*\.(docx|DOCX|doc|DOC|pdf|PDF)$" ControlToValidate="fupCV"
                                        Text="**" ErrorMessage="Invalid CV file type." Display="Dynamic"></asp:RegularExpressionValidator>
                                    <br />
                                    <span style="font-weight: bold; font-size: x-small;">(Size Limit: <span style="color: Red;">
                                        1 MB or 1024 KB Max</span>, Format: <span style="color: Red;">PDF or Word file ONLY</span>)</span>
                                    <asp:Label runat="server" ID="lblUploadMessage" Font-Bold="true" ForeColor="Red" />
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" width="170px">
                                Voice Recording
                            </td>
                            <td valign="top">
                                :
                            </td>
                            <td valign="top">
                            <div class="form-submit-button">
                                <a href="../voice-recording/default.aspx" class="opt4" id="aRecord" runat="server">Record</a></div>
                            </td>
                        </tr>
                        <tr>
                            <td width="170px">
                            </td>
                            <td>
                            </td>
                            <td>
                                <div id="divProcessing" style="display: none;">
                                    <asp:Label runat="server" ID="lblSubmitMessage" ForeColor="Red" />
                                </div>
                                <asp:Button runat="server" ID="btnSubmitForm" OnClientClick="javascript:return SubmitConfirm();"
                                    OnClick="btnSubmitForm_Click" CausesValidation="true" ValidationGroup="applynow"
                                    Text="Update" Width="120px" Height="35px" Font-Bold="true" />
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="divMessage" runat="server">
                    <asp:Label runat="server" ID="lblMessage" />
                </div>
            </div>
        </div>
        <!-- Content Column | Start -->
        <div class="clear">
        </div>
    </div>
    <div class="seperator">
    </div>

    <script language="javascript" type="text/javascript">
        function SetTextLimit(limitField, limitCount) {
            limitText(limitField, document.getElementById('<=txtResumeCountDown.ClientID>'), limitCount);
        }

        function limitText(limitField, limitCount, limitNum) {
            //alert(limitField.value);
            //alert(limitCount.value);
            //alert(limitNum);
            if (limitField.value.length > limitNum) {
                limitField.value = limitField.value.substring(0, limitNum);
            } else {
                limitCount.value = limitNum - limitField.value.length;
            }
        }

        function SubmitConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('applynow')) {
                _retVal = confirm('Do you confirm to UPDATE your profile?');
                if (_retVal) {
                    document.getElementById('<%=lblSubmitMessage.ClientID%>').innerHTML = 'Processing...';
                    document.getElementById('divProcessing').style.display = '';
                    //document.getElementById('<%=lblSubmitMessage.ClientID%>').style.color = 'gray';
                    document.getElementById('<%=btnSubmitForm.ClientID%>').style.display = 'none';
                }
            }
            return _retVal;
        }

    </script>

</asp:Content>



